<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Jaws.Core.Web.Entities.Recipes.Recipe>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Create</h2>
    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>
    <% using (Html.BeginForm())
       {%>
    <fieldset>
        <legend>Create a new recipe.</legend>
        <p>
            <label for="Name">
                Name:</label>
            <%= Html.TextBox("Name", Model.Name) %>
            <%= Html.ValidationMessage("Name", "*") %>
        </p>
        <p>
            <label for="Ingredients">
                Ingredients:</label>
            <%= Html.TextArea("Ingredients") %>
            <%= Html.ValidationMessage("Ingredients", "*")%>
        </p>
        <p>
            <label for="Instructions">
                Instructions:</label>
            <%= Html.TextBox("Instructions", Model.Instructions) %>
            <%= Html.ValidationMessage("Instructions", "*") %>
        </p>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
